<?PHP 
session_start();
require_once('../db.php');
require_once('classes/classEditor.php');

$myEditor = new Editor();

$myLogin = $myEditor->iniciarSesion($_POST["txtLogin"], $_POST["passwd"]);

if(is_string($myLogin)){ echo $myLogin."<br><a href='".$myEditor->Inicio."'>Regresar...</a>";}
if(is_object($myLogin)){ 

	$_SESSION["AdminID"] = $myLogin->adminid;
	$_SESSION["AName"] = $myLogin->nombre." ".$myLogin->apellido1;

	header('Location: Editor.php');
}

?>
